import Big from '@/libs/big.js'
const num={}

const types=['plus','minus','times','div']
types.forEach(item=>{
	num[item]=(num1,num2,isNumber=true)=>{
		num1=new Big(num1)
		Big.DP=1
		let res=num1[item](num2)
		if(isNumber){
			return Number(res)
		}else{
			return res
		}
	}
})

export default num